package com.MedDroid.activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.TimePicker;
import com.MedDroid.MainApp;
import com.MedDroid.R;
import com.MedDroid.task.AddNewAppointmentTask;

public class AddAppointmentActivity extends Activity
{
	public Button btnSubmitAppointment;
	public EditText EditDuration, EditReason, EditTitle;
	public DatePicker datePicker;
	public TimePicker timePicker;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.add_appointment);
		EditDuration = (EditText) findViewById(R.id.txtRequestDuration);
		EditReason = (EditText) findViewById(R.id.txtRequestReason);
		datePicker = (DatePicker) findViewById(R.id.datePicker);
		timePicker = (TimePicker) findViewById(R.id.timePicker);

		btnSubmitAppointment = (Button) findViewById(R.id.btnAddAppointment);
		btnSubmitAppointment.setOnClickListener(new View.OnClickListener()
		{
			@Override
			public void onClick(View view)
			{
				new AddNewAppointmentTask(((MainApp)getApplication()).getAuthentication(),((MainApp)getApplication()).getDatabase(), AddAppointmentActivity.this).execute();
			}
		});
    }
}